package com.cnblogs.leizia.crm.commen;

/**
 * 返回错误码信息
 *
 * @author leizi
 * @create 2021-02-14 20:28
 */
public enum ErrorCode {
    /******通用错误码******/
    SUCCESS(0, "成功"),

    PARAM_FAIL(9997, "请求参数错误或为空"),
    DISPATCHER(9998, "转发地址错误"),
    REDIRECT(9999, "重定向地址错误"),

    /******1&&&用户错误码******/
    USER_EMPTY(1000, "用户不存在"),
    IP_NO_LOGIN(1001, "ip不允许登录"),
    USER_LOCK(1002, "用户已锁定"),
    USER_OVERTIME(1003, "用户已失效"),
    PASSWORD_FAIL(1004, "密码错误"),

    /******2&&&市场活动错误码******/
    ACTIVITY_ERROR(2001, "添加失败"),
    ACTIVITY_DELETE_ERROR(2002, "删除市场活动失败!"),
    ACTIVITY_EDIT(2003, "没有找到市场活动记录信息"),
    ACTIVITY_UPDATE(2004, "更新市场活动信息失败"),

    /******3&&&市场活动备注错误码******/
    ACTIVITY_DELETE_REMARK_ERROR(3001, "删除市场活动备注失败"),
    ACTIVITY_ADD_REMARK_ERROR(3002, "添加市场活动备注失败"),
    ACTIVITY_EDIT_REMARK_ERROR(3003, "添加市场活动备注失败"),

    /******4&&&线索模块错误码******/
    CLUE_GET_USER_LIST_ERROR(4001, "获取用户列表错误"),
    CLUE_SAVE_ERROR(4002, "保存线索失败"),
    CLUE_UNRELEVANCE(4003, "解除关联失败");

    private int code;
    private String msg;

    ErrorCode() {
    }

    ErrorCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
